import React from 'react';
import ReactDOM from 'react-dom';
import { Table, Form, Input, Button ,Select, Row, Col, DatePicker, Icon, Tabs  } from 'antd';
const TabPane = Tabs.TabPane;
const FormItem = Form.Item;
const Option = Select.Option;
const RangePicker = DatePicker.RangePicker;
import HouseCostSoft from './houseCostSoft';
import HouseCostHard from './houseCostHard';
import HouseCostOther from './houseCostOther';


let Demo = React.createClass({
  getInitialState() {
    return {
      tenementId:'',
      activeKey:''
    }
  },
  componentDidMount(){
    this.setState({
      tenementId:this.props.location.state.tenementId
    });

  },
  // 切换选项卡
  switchTab(key){
    //this.getKeys(key);
    //this.setState({
    //  tenementId:this.props.location.state.tenementId
    //});
  },
  render () {
    // console.log('this.state.tenementId',this.state.tenementId);
    console.log(this.props.location)
    return (
      <div>
        <Tabs onChange={this.switchTab} type="card">
          <TabPane tab="软装项目" key="softDecorateCost">
            <HouseCostSoft tenementId={this.props.location.state.tenementId} allProps={this.props.location.state}/>
          </TabPane>
          <TabPane tab="硬装项目" key="decorateCost">
            <HouseCostHard tenementId={this.props.location.state.tenementId}  allProps={this.props.location.state}/>
          </TabPane>
          <TabPane tab="其他项目" key="Cost">
            <HouseCostOther tenementId={this.props.location.state.tenementId}  allProps={this.props.location.state}/>
          </TabPane>
        </Tabs>


        </div>
    );
  }
});

Demo = Form.create()(Demo);
export default Demo
